{include file="public_head" /}


<body class="nav-md">

<div class="container body">


    <div class="main_container">

        {include file="public_sidebar,public_nav" /}

        <!-- page content -->
        <div class="right_col" role="main">

            <!-- top tiles -->
            <div class="row tile_count" style="padding-top: 100px;padding-bottom: 50px;">
                <div class="animated flipInY col-md-2 col-sm-4 col-xs-4 tile_stats_count">
                    <div class="left"></div>
                    <div class="right">
                        <span class="count_top"><i class="fa fa-user"></i> 会员总数</span>
                        <div class="count green">{$member_sum} 人</div>
                        <!--<span class="count_bottom"><i class="green">4% </i> From last Week</span>-->
                    </div>
                </div>
                <div class="animated flipInY col-md-2 col-sm-4 col-xs-4 tile_stats_count">
                    <div class="left"></div>
                    <div class="right">
                        <span class="count_top"><i class="fa fa-clock-o"></i> 成交订单总数</span>
                        <div class="count green" style="font-size: 30px">{$member_order_sum} 单</div>
                        <!--<span class="count_bottom"><i class="green"><i class="fa fa-sort-asc"></i>3% </i> From last Week</span>-->
                    </div>
                </div>

                <div class="animated flipInY col-md-2 col-sm-4 col-xs-4 tile_stats_count">
                    <div class="left"></div>
                    <div class="right">
                        <span class="count_top"><i class="fa fa-shopping-cart"></i> 上架商品总数</span>
                        <div class="count green" style="font-size: 30px;">{$stat_goods} 个</div>
                        <!--<span class="count_bottom"><i class="green"><i class="fa fa-sort-asc"></i>34% </i> From last Week</span>-->
                    </div>
                </div>
                <!--<div class="animated flipInY col-md-2 col-sm-4 col-xs-4 tile_stats_count">-->
                    <!--<div class="left"></div>-->
                    <!--<div class="right">-->
                        <!--<span class="count_top"><i class="fa fa-shopping-cart"></i> 积分商品总数</span>-->
                        <!--<div class="count green" style="font-size: 30px;">{:cache('stat_integral_goods')} 个</div>-->
                        <!--&lt;!&ndash;<span class="count_bottom"><i class="green"><i class="fa fa-sort-asc"></i>34% </i> From last Week</span>&ndash;&gt;-->
                    <!--</div>-->
                <!--</div>-->
                <!--<div class="animated flipInY col-md-2 col-sm-4 col-xs-4 tile_stats_count">-->
                    <!--<div class="left"></div>-->
                    <!--<div class="right">-->
                        <!--<span class="count_top"><i class="fa fa-shopping-cart"></i> 平台累计访问量</span>-->
                        <!--<div class="count green" style="font-size: 30px;">{:cache('cumulative_access')} 人次</div>-->
                        <!--&lt;!&ndash;<span class="count_bottom"><i class="green"><i class="fa fa-sort-asc"></i>34% </i> From last Week</span>&ndash;&gt;-->
                    <!--</div>-->
                <!--</div>-->

            </div>

            <!--top-->
            <div class="col-md-4 col-xs-12 ">
                <div class="x_panel">
                    <div class="x_title">
                        <h2>最新注册会员
                        </h2>
                        <div class="clearfix"></div>
                    </div>
                    <div class="x_content" style="height: 422px;">
                        {foreach name=':cache("index_member")' id='member_list'}
                            <article class="media event">
                                <span class="pull-left date">
                                    <img id="imgShow" src="__PUBLIC__/{$item.avatar|default=''}"
                                         width="42" height="50"
                                         style="width:42px; height:50px; border-radius:50%; overflow:hidden;"
                                         onerror="this.src='__STATIC__/images/user.png'"/>
                                </span>
                                <div class="media-body">
                                    <a class="title" href="#">账号：{$member_list.username}</a>
                                    <p>注册时间：{$member_list.create_time}</p>
                                </div>
                            </article>
                        {/foreach}
                    </div>
                </div>
            </div>

            <!--top-->
            <div class="col-md-4 col-xs-12">
                <div class="x_panel">
                    <div class="x_title">
                        <h2>最新成交订单
                        </h2>
                        <div class="clearfix"></div>
                    </div>
                    <div class="x_content" style="height: 422px;">
                        {foreach name=':cache("index_order")' id='order_list'}
                        <article class="media event">
                            <span class="pull-left date">
                                <p class="month">{:date('m',strtotime($order_list.create_time))} 月</p>
                                <p class="day">{:date('d',strtotime($order_list.create_time))}</p>
                            </span>
                            <div class="media-body" style="width: 67%;">
                                <a class="title" href="#">订单号：{$order_list.shop_order_number}</a>
                                <p>
                                    订单状态：
                                    {switch name="order_list.status"}
                                    {case value="0"}未支付{/case}
                                    {case value="1"}已支付{/case}
                                    {case value="2"}已发货{/case}
                                    {case value="3"}已收货{/case}
                                    {case value="4"}已完结{/case}
                                    {case value="5"}已取消{/case}
                                    {case value="6"}申请退款{/case}
                                    {case value="7"}退款成功{/case}
                                    {default /}出错啦
                                    {/switch}
                                    &nbsp;&nbsp;&nbsp;&nbsp;
                                    订单价格：
                                    {$order_list.price}
                                </p>
                            </div>
                        </article>
                        {/foreach}
                    </div>
                </div>
            </div>

            <!--top-->

            <br/>

        </div>
        <!-- /page content -->
    </div>

</div>

{include file="public_foot" /}
<!-- Flot -->
<script>
    $(document).ready(function () {
        //define chart clolors ( you maybe add more colors if you want or flot will add it automatic )
        var chartColours = ['#96CA59', '#3F97EB', '#72c380', '#6f7a8a', '#f7cb38', '#5a8022', '#2c7282'];

        //generate random number for charts
        randNum = function () {
            return (Math.floor(Math.random() * (1 + 40 - 20))) + 20;
        };

        var d1 = [];
        //var d2 = [];

        //here we generate data for chart
        for (var i = 0; i < 30; i++) {
            d1.push([new Date(Date.today().add(i).days()).getTime(), randNum() + i + i + 10]);
            //    d2.push([new Date(Date.today().add(i).days()).getTime(), randNum()]);
        }

        var chartMinDate = d1[0][0]; //first day
        var chartMaxDate = d1[20][0]; //last day

        var tickSize = [1, "day"];
        var tformat = "%d/%m/%y";

        //graph options
        var options = {
            grid: {
                show: true,
                aboveData: true,
                color: "#3f3f3f",
                labelMargin: 10,
                axisMargin: 0,
                borderWidth: 0,
                borderColor: null,
                minBorderMargin: 5,
                clickable: true,
                hoverable: true,
                autoHighlight: true,
                mouseActiveRadius: 100
            },
            series: {
                lines: {
                    show: true,
                    fill: true,
                    lineWidth: 2,
                    steps: false
                },
                points: {
                    show: true,
                    radius: 4.5,
                    symbol: "circle",
                    lineWidth: 3.0
                }
            },
            legend: {
                position: "ne",
                margin: [0, -25],
                noColumns: 0,
                labelBoxBorderColor: null,
                labelFormatter: function (label, series) {
                    // just add some space to labes
                    return label + '&nbsp;&nbsp;';
                },
                width: 40,
                height: 1
            },
            colors: chartColours,
            shadowSize: 0,
            tooltip: true, //activate tooltip
            tooltipOpts: {
                content: "%s: %y.0",
                xDateFormat: "%d/%m",
                shifts: {
                    x: -30,
                    y: -50
                },
                defaultTheme: false
            },
            yaxis: {
                min: 0
            },
            xaxis: {
                mode: "time",
                minTickSize: tickSize,
                timeformat: tformat,
                min: chartMinDate,
                max: chartMaxDate
            }
        };
        var plot = $.plot($("#placeholder33x"), [{
            label: "Email Sent",
            data: d1,
            lines: {
                fillColor: "rgba(150, 202, 89, 0.12)"
            }, //#96CA59 rgba(150, 202, 89, 0.42)
            points: {
                fillColor: "#fff"
            }
        }], options);
    });
</script>
<!-- /Flot -->

</body>

</html>
